package com.yh.javabean;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

public class UserTest {
    @Select("select * from user")
    /*  Results 用于在当前方法上定义关系映射相当于mapper中的resultMap标签 */
    @Results(id = "mu", value = {
            /*  Result根据id是否为true 相当于mapper中的id 与 result标签 */
            @Result(id = true, column = "uid", property = "id"),
            @Result(id = false, column = "uusername", property = "username"),
            @Result(id = false, column = "upassword", property = "password")
    })
    <MyUser>
    ArrayList<MyUser> selectAllMyUser() {
        return null;
    }
}
